<style>
    .layui-card:last-child {
        width: 95%;
        /* min-height: 1100px; */
        margin: 0 auto;
        margin-top: 32px;
        border-radius: 8px;
        padding: 10px 15px;
        box-sizing: border-box;
    }
    
    .layui-card-body {
        width: 96%;
        margin: 0 auto;
        margin-top: 50px;
        box-shadow: 0px 2px 6px 0px rgba(6, 185, 145, 0.2);
    }
    
    .sanbut {
        float: right;
        display: flex;
        justify-content: space-around;
        align-items: center;
        /* position: absolute;
      right: 0;
      top: 0; */
    }
    
    .threemin {
        width: 39%;
        margin: 13px 0px 12px 0;
        background-color: #F5F5F5;
        border-radius: 4px;
        float: left;
        padding: 10px 20px;
        box-sizing: border-box;
        min-height: 176px;
    }
    
    .threemax {
        width: 59%;
        background-color: #F5F5F5;
        border-radius: 4px;
        margin: 13px 0px 12px 0;
        float: right;
        padding: 10px 20px;
        box-sizing: border-box;
    }
    
    .threemaxpor {
        width: 33%;
        background-color: #F5F5F5;
        border-radius: 4px;
        /* margin: 13px 0px 12px 0; */
        padding: 10px 20px;
        box-sizing: border-box;
    }
    
    th {
        border: transparent !important;
    }
    
    tr {
        border-bottom: 1px solid #F5F5F5;
    }
    
    .layui-btn-danger {
        background-color: #F87C7E;
    }
    
    .aa {
        border-radius: 8px;
        background-color: #F5F5F5;
        padding-left: 10px;
        width: 200px;
    }
    
    .bb {
        background-color: #06B991;
        display: inline-block;
        width: 90px;
        height: 38px;
        line-height: 38px;
        padding: 0 18px;
        /* background-color: transparent; */
        color: #fff;
        white-space: nowrap;
        text-align: center;
        font-size: 14px;
        border: none;
        /* border-radius: 2px; */
        cursor: pointer;
        border-radius: 8px;
        /* border: 1px solid #DCDFE6; */
        margin-right: 10px;
    }
    
    .layui-btn {
        display: inline-block;
        min-width: 90px;
    }
    
    .cc {
        min-width: 190px;
        font-size: 15px;
    }
    
    .minbox {
        /* width: 300px; */
        margin: 14px 0;
        width: 100%;
    }
    
    .layui-layer-page .layui-layer-content {
        width: 360px;
    }
    
    .layui-table,
    .layui-table-view {
        margin: 4px 0;
    }
    
    .zuobiao {
        width: 100%;
        text-align: center;
        font-size: 22px;
        margin: 23px 0;
    }
    
    .xy {
        font-size: 18px;
        width: 100%;
        text-align: center;
        margin-top: 12px;
    }
    
    .xy>input {
        margin-left: 22.5px;
        border-radius: 8px;
        background-color: #F5F5F5;
        height: 24.5px;
        width: 162px;
        padding-left: 10px;
        border: none;
    }
    
    .put>input {
        margin-left: 5.5px;
        border-radius: 8px;
        background-color: #F5F5F5;
        height: 24.5px;
        width: 162px;
        padding-left: 10px;
        border: none;
    }
    
    .xy>input::placeholder {
        font-size: 15px;
    }
    
    .liangbut {
        margin-top: 29.5px;
        display: flex;
        justify-content: center;
        margin-bottom: 10px;
    }
    
    tr {
        border: 1px solid #F5F5F5;
    }
    /* .layui-tab-item {
      height: 500px;
  }
   */
    
    .layui-form-item {
        position: absolute;
        top: 0;
        width: 98%;
    }
    
    .layui-this {
        background-color: #06B991;
        color: #fff !important;
    }
    
    .layui-tab-title {
        border: none;
    }
    
    .layui-tab-title .layui-this:after {
        border: none;
    }
    
    .layui-tab-content {
        padding: 10px 0;
        box-sizing: border-box;
    }
    
    .xian {
        width: 70%;
        height: 20px;
        margin: 24px auto;
        color: #06B991;
        font-size: 18px;
        text-align: center;
        line-height: 20px;
        background: url(https://njyyl.oss-cn-hangzhou.aliyuncs.com/images/xian.png?versionId=CAEQIRiBgICZl9Gu4RciIDk5ODA5OGY4Mzg5OTRkYWU5ZmVjNzllZTBiNGY0YmU5) no-repeat;
        background-size: 100%;
    }
    
    .list {
        width: 100%;
        margin: 0% 0 2% 0
    }
    
    .son {
        width: 100px;
        height: 100px;
        background: url(https://njyyl.oss-cn-hangzhou.aliyuncs.com/images/yuan.png?versionId=CAEQIRiBgMCSl9Gu4RciIDc1ODM2YjY1Mjk0MzQ5NWZhN2E3MzViZjVmM2IzNmY1) no-repeat;
        background-size: 100% 100%;
        /* line-height: 129px; */
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        float: left;
        margin: 12px 12px 0 0;
        cursor: pointer;
    }
    
    .sonwc {
        width: 100px;
        height: 100px;
        background: url(https://njyyl.oss-cn-hangzhou.aliyuncs.com/images/yuan.png?versionId=CAEQIRiBgMCSl9Gu4RciIDc1ODM2YjY1Mjk0MzQ5NWZhN2E3MzViZjVmM2IzNmY1) no-repeat;
        background-size: 100% 100%;
        /* line-height: 129px; */
        text-align: center;
        float: left;
        margin: 12px 12px 0 0;
        cursor: pointer;
    }
    
    .dd {
        background-color: #FEA858;
    }
    /*二级菜单样式修改*/
    
    .baba li {
        border: 1px solid #F2F3F6;
        border-radius: 10px;
        color: black;
        display: inline-block;
        width: 80px;
        height: 38px;
        line-height: 38px;
        padding: 0 18px;
        white-space: nowrap;
        text-align: center;
        font-size: 14px;
        cursor: pointer;
        border-radius: 8px;
        margin-right: 8px;
    }
    
    .erzi li {
        background-color: white !important;
        color: black !important;
        border: 1px solid #F2F3F6;
        border-radius: 10px;
        display: inline-block;
        width: 60px;
        height: 30px;
        font-size: 14px;
        line-height: 30px;
        padding: 0 13px;
        white-space: nowrap;
        margin-right: 5px;
    }
    
    .erzi .layui-this {
        border: 1px solid #8DDFCC;
        color: #8DDFCC !important;
    }
    
    .cansu {
        width: 211px;
        height: 215px;
        background: url(https://njyyl.oss-cn-hangzhou.aliyuncs.com/images/kuang.png?versionId=CAEQIRiBgICmosG94RciIGJmYzIxMjBhMDg5MzQxODRhNDEwNWRkZTI3OTJhM2Vj) no-repeat;
        background-size: 100% 100%;
        margin-right: 12.5px;
        margin-bottom: 15px;
        float: left;
    }
    
    [v-cloak] {
        display: none;
    }
    
    .maxcansu {
        width: 433.75px;
        height: 124.4px;
        background: url(https://njyyl.oss-cn-hangzhou.aliyuncs.com/images/maxkuang.png?versionId=CAEQIRiBgIDY_qa.4RciIGNmYWQyYWNjZGFjYTRkMzA5N2IyY2UzNjQ2MWVlMmE3) no-repeat;
        background-size: 100% 100%;
        margin-right: 12.5px;
        margin-bottom: 15px;
        float: left;
    }
    
    .kuang {
        display: flex;
        justify-content: space-around;
        align-items: center;
        font-size: 15px;
        height: 30px;
    }
    
    .kuangall {
        padding: 15px;
    }
    
    .maxkuang {
        padding: 15px 10px;
    }
    
    .minput {
        width: 61px;
        background-color: #F5F5F5;
        border: 1px solid #DCDFE6;
        color: #06B991;
        text-align: center;
    }
    
    .bcby {
        width: 100%;
        text-align: center;
        margin: 50px 0;
    }
    
    .bian {
        box-shadow: 0px 2px 6px 0px rgba(6, 185, 145, 0.2);
    }
    
    .yiyy {
        position: absolute;
        background-color: #DCDFE6;
        width: 100%;
        height: 100%;
        opacity: 0.8;
    }
    
    th,
    td {
        text-align: center;
    }
    
    .layui-table th {
        font-weight: 100;
        color: black;
    }
    
    .leftbiao {
        width: 60%;
        margin: 12px 0 0 0;
        box-shadow: 0px 2px 6px 0px rgba(6, 185, 145, 0.2);
        padding-bottom: 10px;
        box-sizing: border-box;
        float: left;
    }
    
    .rightbiao {
        width: 36%;
        margin: 12px 0 0 0;
        box-shadow: 0px 2px 6px 0px rgba(6, 185, 145, 0.2);
        padding-bottom: 10px;
        box-sizing: border-box;
        float: right;
    }
    
    .dibulan {
        width: 90%;
        margin: 5px auto;
        font-size: 16px;
        border-radius: 4px;
        text-align: center;
        height: 46px !important;
    }
    
    .divhui {
        background-color: #F5F5F5;
        width: 221px;
        height: 46;
        float: left;
        margin-right: 12px;
        border-radius: 5px;
        margin-top: 10px;
    }
    
    .dibukg {
        position: relative;
        width: 10px;
        float: right;
        margin-right: 20px;
    }
    
    .zhuangtai {
        float: left;
        font-size: 15px;
        margin-left: 20%;
        height: 38px;
        line-height: 38px;
    }
    
    .hdtext {
        width: 90%;
        margin: 0 auto;
        font-size: 4rem;
        font-weight: 600;
    }
    
    .tbodyf td,
    .tbodyf th {
        padding: 6.5px 15px !important;
        text-align: left;
        font-size: 4rem;
    }
    
    .tbodyf>tr>td {
        text-align: left !important;
    }
    
    .zttwoa {
        width: 60%;
        box-shadow: 0px 2px 6px 0px rgba(6, 185, 145, 0.2);
        margin: 23px 0px 0 0;
        padding: 10px 20px;
        box-sizing: border-box;
        border-radius: 8px;
        min-height: 257.281px;
        float: left;
    }
    
    .zttwob {
        width: 35%;
        box-shadow: 0px 2px 6px 0px rgba(6, 185, 145, 0.2);
        margin: 23px 12px 0 0;
        padding: 10px 20px;
        box-sizing: border-box;
        border-radius: 8px;
        float: right;
        min-height: 257.281px;
        /* position: relative; */
    }
    
    .yinyin {
        width: 100%;
        height: 100%;
        background-color: #F5F5F5;
        opacity: 0.5;
        position: absolute;
        top: 0;
        left: 0;
        display: none;
    }
    
    .twolefta {
        width: 100%;
        font-size: 4rem;
    }
    
    .twoleftb {
        width: 50%;
        font-size: 4rem;
        float: left;
    }
    
    .twoleftc {
        width: 40%;
        font-size: 4rem;
        float: left;
        height: 55px;
        padding-top: 7px;
    }
    
    .twoleftd {
        width: 60%;
        font-size: 4rem;
        float: right;
        height: 55px;
        padding-top: 7px;
    }
    
    .layui-form-switch {
        margin-top: 0;
    }
    
    .tworight {
        width: 100%;
        background-color: #F5F5F5;
        padding: 5px 10px;
        box-sizing: border-box;
    }
    /* .layui-table {
      width: 100%;
      background-color: #F5F5F5;
      color: #666;
  } */
    
    .ztthree {
        width: 100%;
        box-shadow: 0px 2px 6px 0px rgba(6, 185, 145, 0.2);
        padding: 10px 20px;
        box-sizing: border-box;
        border-radius: 4px;
        margin-top: 12px;
    }
    
    .fudong {
        display: flex;
        justify-content: space-between;
    }
    
    .shebeiall {
        border-radius: 8px;
        border: 1px solid #DCDFE6;
        text-align: center;
        font-size: 14px;
        padding: 0 18px;
        height: 38px;
        line-height: 38px;
        margin-right: 10px;
    }
    
    .layui-form-select .layui-input {
        border-radius: 8px;
        background-color: #F5F5F5;
    }
    
    .layui-card-header {
        line-height: 30px;
    }
    
    .clbh {
        height: 38px;
        line-height: 38px;
        float: left;
        margin-right: 10px;
    }
    
    .ka {
        width: 100%;
    }
    
    .kahao {
        width: 100%;
        font-size: 5rem;
        font-weight: 600;
        text-align: center;
        margin: 2% auto;
    }
    
    .duka {
        width: 40%;
        float: left;
        font-size: 4rem;
        text-align: right;
    }
    
    .tongxin {
        width: 40%;
        float: right;
        font-size: 4rem;
        text-align: left;
    }
    
    .yi {
        position: relative;
    }
</style>
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-form layui-card-header layuiadmin-card-header-auto" lay-filter="layadmin-useradmin-formlist">
            <div class="layui-tab" id="app" v-cloak>
                <div class="clbh"> 车辆编号:</div>
                <div class="layui-inline" style="float: left;">

                    <div class="layui-form-item">
                        <div class="layui-input-inline">
                            <select name="interest-search" class="soso" lay-filter="interest-search" lay-search style="background-color: #F5F5F5;">
                                  </select>
                        </div>
                    </div>
                </div>
                <div class="zhuangtai">有效坐标数：</div>
                <div class="layui-input-block" style="float: left;">
                    <input type="text" name="truename" placeholder="输入有效坐标数" readonly autocomplete="off" v-model="size" class="layui-input aa">
                </div>
                <!-- </div> -->

                <div class="sanbut">
                    <button class="layui-btntm layuiadmin-btn-useradmin" lay-submit @click="addData">保存</button>
                    <button class="layui-btntm layuiadmin-btn-useradmin" lay-submit @click="addljsx">立即生效</button>
                    <button class="layui-btntm layuiadmin-btn-useradmin" lay-submit id="uploadExcel">导入</button>
                    <button class="layui-btn layuiadmin-btn-useradmin bb" lay-submit @click='qingkong'>清空</button>
                </div>
                <div style="clear: both;"></div>
                <!-- 加个50是为了看起来大家都在一个水平上，不会因为别人有二级菜单，就一会上一会下的，要是不想要可以去掉，因为二级的高度是40 -->
                <div class="layui-tab-content" style="overflow: auto;">
                    <table class="layui-table" style="width: 100%;">
                        <!-- <colgroup>
                            <col width="262">
                            <col width="85%">
                            <col>
                        </colgroup> -->
                        <tbody>
                            <tr>
                                <td></td>
                                <td>1</td>
                                <td>2</td>
                                <td>3</td>
                                <td>4</td>
                                <td>5</td>
                                <td>6</td>
                                <td>7</td>
                                <td>8</td>
                                <td>9</td>
                                <td>10</td>
                            </tr>

                            <tr v-for="(item,index) in listdata">
                                <td>{{index+1}}</td>
                                <td v-for="(item1,index1) in item" @click="open(index,index1)">({{item1[0]}},{{item1[1]}})</td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>

        </div>
    </div>
</div>
<!-- <script>
  function  holdDown()  {            
      console.log('按下事件')      
  }        
  function  holdUp()  {            
      alert('松开事件')
  }
</script> -->
<script src="/start/vue.js"></script>
<script src="/start/layui/lay/modules/jquery.js"></script>
<script>
    layui.use('useradmin', layui.factory('useradmin')).use(['admin', 'useradmin', 'table', "laypage", "layer", "upload"], function() {
        var $ = layui.$,
            admin = layui.admin,
            view = layui.view,
            setter = layui.setter,
            table = layui.table,
            laypage = layui.laypage,
            upload = layui.upload,
            layer = layui.layer,
            form = layui.form;


        function resetSize() {
            var base = 16;
            var width = document.documentElement.clientWidth;
            var fontSize = 16 / 6000 * width;
            document.documentElement.style.fontSize = fontSize + 'px'
        }
        resetSize()
        window.onresize = resetSize

        upload.render({
            elem: '#uploadExcel',
            url: setter.request.baseUrl + "agv-map/upload",
            accept: 'file' //普通文件
                ,
            multiple: true,
            done: function(res) {
                layui.table.reload("table-instance");
            }
        });
        form.render(null, 'layadmin-useradmin-formlist');
        form.on('checkbox(switchTest)', function(data) {　　
            console.log('打', data);　　 //打印当前选择的信息
            if (data.elem.checked) {　　　　　　 //判断当前多选框是选中还是取消选中
                alert('当前选中');
            }　　
            var value = data.value; //获取选中的value值
        });
        //监听搜索
        form.on('submit(LAY-user-back-search)', function(data) {
            var field = data.field;

            //执行重载
            table.reload('table-instance', {
                where: field
            });
        });

        new Vue({
            el: '#app',
            data: {
                listdata: [],
                size: 0,
                alldata: [],
                itemdata: [],
                kong: [0, 0]
            },
            //计算
            computed: {

            },
            //初始调用
            created() {
                this.getbianhao()

            },
            updated: function() {
                layui.use(['form'], function() {
                    form.render();
                })
            },
            methods: {
                paixu(arr) {
                    // console.log(arr)
                    var re = /^[0-9]+.?[0-9]*$/,
                        small = [];
                    for (let i = 0; i < arr.length; i++) {
                        for (let j = 0; j < arr[i].length; j++) {

                            if (re.test(arr[i][j][0])) {
                                // console.log(arr[i][j])
                                small = small.concat(arr[i][j])
                            } else {

                            }
                        }
                    }
                    // console.log(small)
                    this.youzhi(small)
                },
                open(x, y) {
                    var re = /^[0-9]+.?[0-9]*$/; //判断字符串是否为数字 //判断正整数 /^[1-9]+[0-9]*]*$/
                    var that = this;
                    var arr = that.listdata;
                    // console.log(arr)
                    // console.log(x)
                    // 判断可不可以被修改
                    var shifou = that.listdata[x][y];
                    if (re.test(shifou[0])) {
                        var btn = ['保存', '删除', '取消'];
                    } else {
                        var btn = ['保存', '取消'];
                    }

                    layer.open({
                        type: 1,
                        content: "<div class='minboxa'><div class='zuobiao'>坐标</div><div class='xy'><div class='put' style='float: left;margin-left:30px;'> X : <input id='one1026' style='width: 95px;' placeholder='请输入值' type='text'></div><div class='put' style='float: right;margin-right:30px;'>Y : <input id='three1026' style='width: 95px;' placeholder='请输入值' type='text'></div><div style='clear:both;'></div></div></div>",
                        btn: btn,
                        success: function(layero, index) { //弹出层加载成功后执行
                            if (re.test(shifou[0])) {
                                $('#one1026').val(shifou[0]);
                                $('#three1026').val(shifou[1]);
                            }
                        },
                        btn2: function(index, layero) {
                            if (re.test(shifou[0])) {
                                //点击第二个按钮处理逻辑
                                arr[x].splice(y, 1);
                                // 删除成功之后重新排序
                                that.paixu(arr);
                                // console.log(arr)
                            }

                        },
                        yes: function(index, layero) {
                            if (re.test(shifou[0])) {
                                var one1026 = $('#one1026').val();
                                var three1026 = $('#three1026').val();
                                // 判断必须是数字
                                if (!re.test(one1026) || 　!re.test(three1026)) {
                                    console.log('必须是数字')
                                    return;
                                }
                                var pingjie = [JSON.parse(one1026), JSON.parse(three1026)]
                                arr[x][y] = pingjie;
                                that.listdata = [];
                                that.listdata = arr;

                                return
                            }
                            if (that.kong[0] == 10 && that.kong[1] == 0) {
                                console.log('没有多余的位置了')
                                return;
                            }
                            var one1026 = $('#one1026').val();
                            var three1026 = $('#three1026').val();
                            // 判断必须是数字
                            if (!re.test(one1026) || 　!re.test(three1026)) {
                                console.log('必须是数字')
                                return;
                            }
                            var pingjie = [JSON.parse(one1026), JSON.parse(three1026)]
                            arr[that.kong[0]][that.kong[1]] = pingjie;
                            that.listdata = [];
                            that.listdata = arr;
                            if (that.kong[1] < 9) {
                                that.kong = [that.kong[0], that.kong[1] + 1]
                            } else {
                                that.kong = [that.kong[0] + 1, 0]
                            }
                            that.size = that.kong[0] * 10 + that.kong[1];

                            // console.log(that.listdata)
                        }
                    });
                },
                getbianhao() {
                    var that = this;
                    admin.req({
                        url: setter.request.baseUrl + "agv-info/query",
                        data: JSON.stringify({}),
                        type: "POST",
                        dataType: "json",
                        contentType: "application/json;charset=UTF-8",
                        done: function(res) {
                            var aaa = res.info.length - 1
                            var html = "<option style='color:#e6e6e6;' value=''>请选择车辆编号</option>";
                            for (i = 0; i < res.info.length; i++) {
                                html += "<option selected = 'selected' name=" + res.info[i].ctrlid + " value=" + res.info[i].agvId + ">" + res.info[i].agvId + "</option>"
                            }
                            that.alldata = res.info;
                            $(".soso").empty().append(html)
                            form.render('select');
                            that.itemdata = res.info[aaa];
                            that.getData()
                                //事件下拉框数据发生变化时
                            form.on('select(interest-search)', function(data) {
                                var data_val = data.value;
                                var index = $(this).index();
                                that.itemdata = that.alldata[index - 1]
                                if (data_val == "") {
                                    that.getData()
                                } else {
                                    that.getData()
                                }
                            });
                        },

                    });
                },
                getData() {
                    var that = this;
                    admin.req({
                        url: setter.request.baseUrl + "agv-map/query",
                        data: JSON.stringify({
                            agvId: that.itemdata.agvId,
                            ctrlId: that.itemdata.ctrlId
                        }),
                        type: "POST",
                        dataType: "json",
                        contentType: "application/json;charset=UTF-8",
                        done: function(res) {
                            if (res.info) {
                                that.size = res.info[0].size
                                if (res.info[0].map) {
                                    // 有值
                                    var zhi = res.info[0].map;
                                    zhi = JSON.parse(zhi);
                                    that.youzhi(zhi.map);
                                } else {
                                    // 没值
                                    that.kong = [0, 0];
                                    that.xuanran(10, 50)
                                }
                            } else {
                                // 没值
                                that.kong = [0, 0];
                                that.xuanran(10, 50),
                                    that.size = 0
                            }
                        },
                    });
                },
                // uploadExcel() {
                //     console.log('az')

                // },

                youzhi(data) {
                    var that = this;
                    var zhi = data,
                        arr2 = [];
                    // console.log(zhi)
                    // 把数据分成四等分
                    for (var i = 0; i < zhi.length; i = i + 2) {
                        arr2.push(zhi.slice(i, i + 2));
                    }
                    if (arr2.length < 10) {
                        that.kong = [parseInt(arr2.length / 10), arr2.length];
                    } else {
                        that.kong = [parseInt(arr2.length / 10), arr2.length - (10 * parseInt(arr2.length / 10))];
                    }
                    that.xuanran(10, 50)
                    var arr = that.listdata,
                        num = 0;

                    // console.log(that.kong)
                    num = that.kong[0] + 1
                    for (var i = 0; i < (that.kong[0] + 1); i++) {
                        if (num > 1) {
                            num = num - 1;
                            for (var j = 0; j < 10; j++) {
                                var shu = i * 10 + j
                                arr[i][j] = arr2[shu];
                            }
                        } else {
                            for (var j = 0; j < that.kong[1]; j++) {
                                var shu = i * 10 + j;
                                arr[i][j] = arr2[shu];
                            }
                        }
                    }
                    that.size = that.kong[0] * 10 + that.kong[1];
                },
                xuanran(lie, hang) {
                    var that = this;
                    var string = ['X', 'Y'];
                    var arr = [];
                    for (let i = 0; i < hang; i++) {
                        var small = [];
                        for (let i = 0; i < lie; i++) {
                            small.push(string)
                        }
                        arr.push(small)
                    }
                    // console.log(arr)
                    that.listdata = arr;
                },
                addData() {
                    var that = this;
                    var arr = [];
                    // console.log(that.listdata)
                    // console.log(that.kong)
                    for (let i = 0; i < that.listdata.length; i++) {
                        for (let j = 0; j < that.listdata[i].length; j++) {
                            if (that.listdata[i][j][0] != 'X') {
                                var b = that.listdata[i][j]
                                arr = arr.concat(b)
                            }
                        }
                    }
                    var size = arr.length / 2;
                    // console.log(arr)
                    let date = new Date();
                    let dateYear = date.getFullYear();
                    let dateMonth = date.getMonth() + 1;
                    let dateDate = date.getDate();
                    let dateHours = date.getHours();
                    let dateMinutes = date.getMinutes();
                    let dateSeconds = date.getSeconds();
                    // console.log('时间：', dateYear + '-' + dateMonth + '-' + dateDate + ' ' + dateHours + ':' + dateMinutes + ':' + dateSeconds)

                    admin.req({
                        url: setter.request.baseUrl + "agv-map/add",
                        data: JSON.stringify({
                            agvId: that.itemdata.agvId,
                            map: JSON.stringify({
                                "map": arr
                            }),
                            ctrlId: that.itemdata.ctrlId,
                            size: size,
                            time: dateYear + '-' + dateMonth + '-' + dateDate + ' ' + dateHours + ':' + dateMinutes + ':' + dateSeconds
                        }),
                        type: "POST",
                        dataType: "json",
                        contentType: "application/json;charset=UTF-8",
                        done: function(res) {
                            layer.msg(res.msg);
                            that.getData();
                        },
                    });
                },
                //立即执行
                addljsx() {
                    var that = this;
                    admin.req({
                        url: setter.request.baseUrl + "agv-command/add",
                        data: JSON.stringify({
                            agvId: that.itemdata.agvId,
                            code: 8217,
                            param: JSON.stringify({}),
                            ctrlId: that.itemdata.ctrlId,
                            status: 1
                        }),
                        type: "POST",
                        dataType: "json",
                        contentType: "application/json;charset=UTF-8",
                        done: function(res) {
                            layer.msg(res.msg);
                        },
                    });
                },
                //情况
                qingkong() {
                    var that = this;
                    admin.req({
                        url: setter.request.baseUrl + "agv-map/clear",
                        data: JSON.stringify({
                            agvId: that.itemdata.agvId
                        }),
                        type: "POST",
                        dataType: "json",
                        contentType: "application/json;charset=UTF-8",
                        done: function(res) {
                            that.getData()
                            layer.msg(res.msg);
                        },
                    });
                }
            }
        })
        upload.render({
            elem: '#uploadExcel',
            url: setter.request.baseUrl + "agv-map/upload",
            accept: 'file' //普通文件
                ,
            multiple: true,
            done: function(res) {
                layui.table.reload("table-instance");
            }
        });
    });
    //远程控制
</script>